<template>
  <div class="goodsDetail">
    <div class="flex_align">
      <div class="mr20">
        <span class="color_494949 ft12 pr5">{{ translate('大类编码') }}：</span>
        <el-input v-model="formInfo.BigCateCode" class="w164" />
      </div>
      <div class="mr20">
        <span class="color_494949 ft12 pr5">{{ translate('大类名称') }}：</span>
        <el-input v-model="formInfo.BigCateName" class="w164" />
      </div>
      <div class="mr20">
        <span class="color_494949 ft12 pr5">{{ translate('库房') }}：</span>
        <el-input v-model="formInfo.WHUnit" class="w164" />
      </div>
    </div>
    <div class="flex_align mt10">
      <div class="mr20">
        <span class="color_494949 ft12 pr5">{{ translate('库房管理员') }}：</span>
        <el-input v-model="formInfo.SKName" class="w164" />
      </div>
      <div class="mr20">
        <span class="color_494949 ft12 pr5">{{ translate('库房管理员姓名') }}：</span>
        <el-input v-model="formInfo.WHManage" class="w164" />
      </div>
      <div class="mr20">
        <span class="color_494949 ft12 pr5">{{ translate('联系电话') }}：</span>
        <el-input v-model="formInfo.WHManageTel" class="w164" />
      </div>
    </div>
  </div>
</template>
<script>
  import { translate } from '@/i18n'
  export default {
    name: 'Detail',
    components: {},
    props: {
      form: {
        type: Object,
        default: () => {
          return {}
        },
      },
      fromtype: {
        type: String,
        default: '',
      },
      whdata: {
        type: Array,
        default: () => {
          return []
        },
      },
    },
    emits: ['changelist'],
    data() {
      return {
        ItemList: [],
        itemChiledList: [],
        WmsData: [], // 选择物资数据
        formInfo: this.form,
        dialogChiled: false,
        layout: 'total, sizes, prev, pager, next, jumper',
        pageNo: 1,
        pageSize: 10,
        searchChild: '',
        searchStorageLocation: '',
        searchWHUnit: '',
        searchitemCode: '',
      }
    },
    watch: {
      chileddetail(val) {
        console.log(val)
        this.tableData = val
      },
      form(val) {
        this.formInfo = val
      },
    },
    methods: {
      translate(row) {
        return translate(row)
      },
    },
  }
</script>
<style lang="scss" scoped>
  .goodsDetail {
    height: 300px;
  }
  .flex_align {
    display: flex;
    align-items: center;
  }
  .tableDetail {
    padding: 10px;
    .button-add {
      text-align: end;
      padding: 10px;
    }
  }
  .mr20 {
    margin-right: 20px;
  }

  .w164 {
    width: 164px !important;
  }
  .mt20 {
    margin-top: 20px;
  }
  .mr10 {
    margin-right: 10px;
  }
  .mt10 {
    margin-top: 10px;
  }
  .w320 {
    width: 433px;
  }
  .color_494949 {
    width: 115px;
    display: inline-block;
    text-align: right;
  }
  ::v-deep .el-scrollbar__wrap {
    overflow-x: auto;
    height: calc(100% + 20px); //多出来的20px是横向滚动条默认的样式
  }
  ::v-deep .el-scrollbar .el-scrollbar__wrap .el-scrollbar__view {
    white-space: nowrap;
    display: inline-block;
  }
  ::v-deep .el-table--scrollable-x .el-table__body-wrapper {
    overflow-x: hidden;
  }
</style>
